/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package supply;

import java.io.BufferedReader;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.ObjectOutputStream;


public class inventory {

// Initialization of all the Variables that are needed in the Inventory
String[] inventoryItem=new String[10];
private static int inventoryRice=0;
private static int inventoryVegetables=0;
private static int inventoryNoodles=0;
private static int inventoryEggs=0;
private static int inventoryChillisauce=0;
private static int inventoryChicken=0;
private static int inventoryEggSoysauce=0;
private static int inventoryChickenSoysauce=0;
private static int inventoryChickenpowder=0;
private static int inventoryThicknoodles=0;
private int inventoryProductQuantity;

InputStreamReader is2=new InputStreamReader(System.in);
BufferedReader br2=new BufferedReader(is2);
Main m1=new Main();


    // The function to show the items in the Inventory System
    void availableitems() throws IOException
    {
        
        System.out.println("-------------------------------------");
        System.out.println("Items Needed for the Inventory are : ");
        System.out.println("-------------------------------------");
        System.out.println("Rice :"+inventoryRice);
        System.out.println("Vegetables :"+inventoryVegetables);
        System.out.println("Noodles :"+inventoryNoodles);
        System.out.println("Eggs :"+inventoryEggs);
        System.out.println("Chillisauce :"+inventoryChillisauce);
        System.out.println("Chicken:"+inventoryChicken);
        System.out.println("Egg Soy Sauce:"+inventoryEggSoysauce);
        System.out.println("Chicken Soy Sauce :"+inventoryChickenSoysauce);
        System.out.println("Chicken Powder:"+inventoryChickenpowder);
        System.out.println("Thick Noodles:"+inventoryThicknoodles);
        System.out.println();
        

    }

    String[] availableitems1() throws IOException
    {
        inventoryItem[0]="Rice";
        inventoryItem[1]="Vegetables";
        inventoryItem[2]="Noodles";
        inventoryItem[3]="Eggs";
        inventoryItem[4]="Chillisauce";
        inventoryItem[5]="Chicken";
        inventoryItem[6]="Egg Soy Sauce";
        inventoryItem[7]="Chicken Soy Sauce";
        inventoryItem[8]="Chicken Powder";
        inventoryItem[9]="Thick Noodles";

        FileOutputStream f = new FileOutputStream("d:/inventory.txt");
        ObjectOutputStream s = new ObjectOutputStream(f);

        for(int j=0;j<10;j++)
        {
        s.writeObject(inventoryItem[j]);
        }
        
        return inventoryItem;

      }

    // The Item Product 0 is Veg Rice
    void product0(int inventoryProductQuantity) throws IOException {
        
        System.out.println();
        System.out.println("The Items Needed are :");
        System.out.println("Rice");
        System.out.println("Vegetables");
        System.out.println("Chilli Sauce");
        System.out.println();


            for(int q=0;q<inventoryProductQuantity;q++)
            {
            inventoryRice++;
            inventoryVegetables++;
            inventoryChillisauce++;
            }

            }
        
        
    // The Item Product 1 is Veg Noodles
    void product1(int inventoryProductQuantity) throws IOException {
        
        System.out.println();
        System.out.println("The Items Needed are :");
        System.out.println("Thick Noodles");
        System.out.println("Vegetables");
        System.out.println("Chilli Sauce");
        System.out.println();

        for(int q=0;q<inventoryProductQuantity;q++)
        {
            inventoryThicknoodles++;
            inventoryVegetables++;
            inventoryChillisauce++;
        }

        
        }


    // The Item Product 2 is Egg Rice
    void product2(int inventoryProductQuantity) throws IOException {
        System.out.println();
        System.out.println("The Items Needed are :");
        System.out.println("Rice");
        System.out.println("Vegetables");
        System.out.println("Chilli Sauce");
        System.out.println("Eggs");
        System.out.println("Egg Soy Sauce");
        System.out.println();

        for(int q=0;q<inventoryProductQuantity;q++)
        {
            inventoryRice++;
            inventoryVegetables++;
            inventoryChillisauce++;
            inventoryEggs++;
            inventoryEggSoysauce++;
        }

        


    }


    // The Item Product 3 is Egg Noodles
    void product3(int inventoryProductQuantity) throws IOException {
        System.out.println();
        System.out.println("The Items Needed are :");
        System.out.println("Noodles");
        System.out.println("Eggs");
        System.out.println("Egg Soy Suuce");
        System.out.println();

        for(int q=0;q<inventoryProductQuantity;q++)
        {
            inventoryNoodles++;
            inventoryEggs++;
            inventoryEggSoysauce++;
        }

       
                    }


    // The Item Product 4 is Chicken Rice
    void product4(int inventoryProductQuantity) throws IOException {
        System.out.println();
        System.out.println("The Items Needed are :");
        System.out.println("Rice");
        System.out.println("Vegetables");
        System.out.println("Chilli Sauce");
        System.out.println("Chicken");
        System.out.println("Chicken Soy Sauce");
        System.out.println("Chicken Powder");
        System.out.println();

        for(int q=0;q<inventoryProductQuantity;q++)
        {
            inventoryRice++;
            inventoryVegetables++;
            inventoryChillisauce++;
            inventoryChicken++;
            inventoryChickenSoysauce++;
            inventoryChickenpowder++;
        }

        
                    }


    // The Item Product 5 is Mixed Rice Noodles
    void product5 (int inventoryProductQuantity) throws IOException {

       

       product0(inventoryProductQuantity);
       product3(inventoryProductQuantity);
        
    }


}
